package com.hk.domain.dto;

import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
public class ValidateDTO {

    /**校验字符串是否为数字*/
    @Pattern(regexp = "^-?\\d+(\\.\\d+)?$", message = "年龄格式有误只能是数字")
    private String age;

    @Pattern(regexp = "^-?\\d+(\\.\\d+)?$", message = "其他格式有误只能是数字")
    private String other;
}
